<template>
<div class=''>
  <el-select v-model="stateVal">
    <el-option v-for="(item,index) in stateEnumList" :key="index" :label="item.display" :value="item.value"></el-option>
  </el-select>
</div>
</template>

<script>
import { getStateEnum } from '@/api/common'

export default {
  name: 'enum',
  data () {
    return {
      stateVal: '',
      stateEnumList: []
    }
  },
  methods: {
    getStateEnum () {
      getStateEnum().then(res => {
        this.stateEnumList = res.result
      }).catch(e => {
        this.$message.error(`error:${e.message}`)
      })
    }
  },
  mounted () {
    this.getStateEnum()
  }
}
</script>

<style lang='less' scoped>
</style>
